package com.itheima.system;

/**
 * System.arrayCopy()
 */
public class Test  {

    public static void main(String[] args) {
        //创建两个数组
        //有数据
        int[] ints = {11,22,33,44,55,66};
        //没有数据
        int[] ints1 = new int[10];


        System.arraycopy(ints,0,ints1,0,ints.length);
        for (int i = 0; i < ints1.length; i++) {
            System.out.println(ints1[i]);
        }
        //复制后两个
        System.arraycopy(ints,ints.length-2,ints1,ints1.length-2,2);
        for (int i = 0; i < ints1.length; i++) {
            System.out.println(ints1[i]);
        }

        Test test = new Test();
        System.out.println(test);

        System.out.println(test.getClass().getName());
        System.out.println(test.hashCode());
    }

    @Override
    public String toString() {
        return "Test{}";
    }
}
